//
//  ClassScrollView.m
//  GiftItems
//
//  Created by lanou3g on 15/9/18.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "ClassScrollView.h"

@implementation ClassScrollView

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        //设置ScrollerView的contentSize
        self.contentSize = CGSizeMake(kWidth * 2, 0);
        self.pagingEnabled = YES;
        self.showsHorizontalScrollIndicator = YES;
        self.bounces = NO;
        
        //初始化  用心挑礼  页面
        _selectView = [[SelectView alloc] initWithFrame:CGRectMake(0, 0, kWidth, self.frame.size.height)];
        _selectView.backgroundColor = [UIColor clearColor];
        [self addSubview:_selectView];
        
        
        //初始化  用心做礼  页面
        _didGiftView = [[DidGiftView alloc] initWithFrame:CGRectMake(self.selectView.frame.size.width, 0, kWidth, self.frame.size.height)];
        _didGiftView.backgroundColor = [UIColor whiteColor];
        [self addSubview:_didGiftView];
    }
    return self;
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
